#include "newproject.h"
#include "ui_newproject.h"
#include "modelchoose.h"

NewProject::NewProject(BasicWindow *parent) :
    BasicWindow(parent), ui(new Ui::NewProject), modelChoose(nullptr)
{
    ui->setupUi(this);
    init();
}

NewProject::~NewProject()
{
    delete ui;
}

void NewProject::init()
{
    initLayout();
}

void NewProject::initLayout()
{
    initTitleBar(this, ":/action/images/companyLogo.png",
                "新建工程", ButtonStyle::CLOSE_BUTTON, QColor(255, 255, 255));
    titleBar->setTitleContent("新建工程", Qt::black);
    titleBar->initStyleSheet(":/action/images/special");
    ui->verticalLayoutTitleBar->addWidget(titleBar);
}

void NewProject::on_radioButton_2_clicked()
{
    if (modelChoose == nullptr) {
        modelChoose = new ModelChoose(this);
    }

    setWindowModality(Qt::WindowModal);
    modelChoose->show();
}
